<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
{% load adminmedia i18n grp_tags %}
<head>
    <title>{% block title %}{% endblock %}</title>
    {% block blockbots %}
        <meta name="robots" content="NONE,NOARCHIVE" />
    {% endblock %}
    <!-- STYLESHEETS -->
    {% block stylesheets %}
        <link href="{% admin_media_prefix %}css/base.css" rel="stylesheet" type="text/css" />
        {% if LANGUAGE_BIDI %}<link href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" rel="stylesheet" type="text/css" />{% endif %}
        <link href="{% admin_media_prefix %}jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" media="screen" title="no title" charset="utf-8" />
        <link href="{% admin_media_prefix %}css/jquery-ui-grappelli-extensions.css" rel="stylesheet" type="text/css" />
    {% endblock %}
    <!-- EXTRASTYLES -->
    {% block extrastyle %}{% endblock %}
    <!-- JAVASCRIPTS -->
    {% block javascripts %}
        <script type="text/javascript">
            // GLOBALS
            var grappelli = {},
                // TODO: klemens: drop ADMIN_URL
                ADMIN_URL = "{% url admin:index %}",
                MODEL_URL_ARRAY = {% get_content_types %},
                DATE_FORMAT = "{% get_date_format %}",
                TIME_FORMAT = "{% get_time_format %}",
                DATETIME_FORMAT = "{% get_datetime_format %}";
        </script>
        
        <!-- NOTE klemens: put this in admin/includes_grappelli/header_js.html -->
        
        <!-- jQuery, jQuery-UI -->
        <script src="{% admin_media_prefix %}jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
        <script src="{% admin_media_prefix %}jquery/ui/js/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>
        <!-- Grappelli Main JS -->
        <script src="{% admin_media_prefix %}js/grappelli/grappelli.js" type="text/javascript"></script>
        <!-- Grappelli jQuery Plugins, Widgets -->
        <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_collapsible.js" type="text/javascript"></script>
        <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_collapsible_group.js" type="text/javascript"></script>
        <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_timepicker.js" type="text/javascript"></script>
        <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_related_fk.js" type="text/javascript"></script>
        <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_related_m2m.js" type="text/javascript"></script>
        <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_related_generic.js" type="text/javascript"></script>
        
    {% endblock %}
    <!-- EXTRAHEAD -->
    {% block extrahead %}{% endblock %}
</head>
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
    <div id="container">
        <!-- HEADER -->
        {% if not is_popup %}
            {% include "admin/includes_grappelli/header.html" %}
            <!-- BREADCRUMBS -->
            {% block breadcrumbs %}
                <div id="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>
            {% endblock %}
        {% endif %}
        <!-- MESSAGES -->
        {% if messages %}
            <ul class="messagelist">
                {% for message in messages %}
                    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
                {% endfor %}
            </ul>
        {% endif %}
        <!-- CONTENT -->
        <div id="content" class="{% block content-class %}{% endblock %}">
            {% block pretitle %}{% endblock %}
            {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
            {% block object-tools %}{% endblock %}
            {% block content %}
                {{ content }}
                {% block filters %}{% endblock %}
            {% endblock %}
            <br class="clear" />
        </div>
        <!-- FOOTER -->
        {% block footer %}<div id="footer"></div>{% endblock %}
    </div>
</body>
</html>